#ifndef __LIGHT_BRIGHTNESS_H
#define __LIGHT_BRIGHTNESS_H


#include "./SYSTEM/sys/sys.h"
#include "conf.h"
#include <math.h>


#define LUMINOSITY_PWM_GPIO_PORT              GPIOA
#define LUMINOSITY_PWM_GPIO_PIN               GPIO_PIN_1
#define LUMINOSITY_PWM_GPIO_CLK_ENABLE()      do{ __HAL_RCC_GPIOA_CLK_ENABLE(); }while(0)

#define LUMINOSITY_TIM5_PWM										TIM5
#define LUMINOSITY_TIM5_PWM_CHY         			TIM_CHANNEL_2
#define LUMINOSITY_TIM5_PWM_CLOCK()						do{ __HAL_RCC_TIM5_CLK_ENABLE(); }while(0)

void luminosity_tim5_pwm_chy_init(uint16_t arr, uint16_t psc, uint16_t burin_ccr);
void output_luminosity(void);

#endif
